package com.simbaliu3.repository;

import com.simbaliu3.model.UserEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * Created by Administrator on 2017/5/25.
 */
@Repository
public interface UserRepository extends JpaRepository<UserEntity, Integer> {

    @Query(value = "select user from UserEntity user where user.phone = ?1 and user.pwd = ?2")
    public UserEntity loginCheck(String phone,String pwd);
}
